<%@ page import="java.net.URLEncoder" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%--<%@ page isELIgnored="false" %>--%>
<!doctype html>
<html>
<head>
    <title></title>
    <script src="${pageContext.request.contextPath}/js/jquery-1.8.0.min.js"></script>
</head>
<body>
<h2>Hello World!</h2>
<form id="form1" action="/test/save" method="post">
    <input name="id" id="id" value="1"/>
    <input name="name"/>
    <input name="password"/>
    <input type="submit" value="提交" />
</form>
${test}
<br/>
${a}
<br/>
<c:if test="${list!= null && list != '[]'}">
    <c:forEach var="item" items="${list}">
        <input type="text" value="${item.name}"/>
    </c:forEach>
</c:if>
<img src="${pageContext.request.contextPath}/images/add.png">
<%!
public int count;
%>
<%
    out.println("<font color='red'>你好，world2！</font>");
    out.write("<font color='green'>你好，world3！</font>");
%>
<br/>
------------------------
<%
    out.println(count++);
    out.println(getServletInfo());
%>
<br/>
------------------------
<%=count%>

<table width="200px" border="1">


<%
    for(int i=0;i<10;i++){
%>
    <tr>
        <td>循环值</td>
        <td><%=i%></td>
    </tr>
    <%   }
%>
    <br/>
    --------------session---------------
    <%
        HttpSession session1=request.getSession();
        HttpSession session2=pageContext.getSession();
        out.println(session1);
        out.println(session1==session2);
        ServletContext application1= pageContext.getServletContext();
        ServletContext application2= session.getServletContext();
        out.println(application1==application2);
        out.println(request.getServletPath());
        out.println( request.getRequestURI());
//        Cookie cookie=new Cookie("aaa", URLEncoder.encode("佛挡杀佛","gbk"));
//        cookie.setMaxAge(111);
//        response.addCookie(cookie);
        out.println(request.getContextPath());
    %>
    <script>
        alert($("#id").val());
    </script>
</table>
</body>
</html>
